home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / game / think / nim.lha / nim / nim.doc < prev    next >
Text File  |  1998-10-07  |  1KB  |  43 lines

  1. Nim (FREEWARE)
  2.  
  3. By Andrew Markwell (andrew.markwell@unn.ac.uk)
  4.  
  5. Nim is an old game invented bythe Japanese (I think), anyway, basically
  6. there is a pile of matchsticks, 2 players.  Each player takes turns in
  7. taking an amount of matchsticks, and the player who removes the last
  8. matchstick is the loser. One player is human, the other the computer.
  9.  
  10. Here is an example game:
  11.  
  12. Welcome to the Game
  13. How many matches in pile to start? 10
  14. What is maximum number that may be taken in one go? 5
  15. Who goes first?  (Enter (C)omputer or (H)uman and press RETURN) c
  16. The computer has removed 4 sticks.
  17. There are now 6 matchsticks left.
  18.  
  19. How many sticks do you take? 3
  20. There are now 3 matchsticks left.
  21.  
  22. The computer has removed 2 sticks.
  23. There are now 1 matchsticks left.
  24.  
  25. How many sticks do you take? 1
  26. There are now 0 matchsticks left.
  27.  
  28. The winner is the computer.
  29.  
  30. It runs front the shell, or any console.
  31.  
  32. If you're wondering why i'd bother upload such a useless thing, or even write
  33. it :P   It's because it was an early C++ assignment, and there was no
  34. other version of Nim on Aminet.  Oh - there is also an executable for VMS,
  35. which the uni used to use, but that's obviously not included here :P
  36.  
  37. =======================================================================
  38.  
  39. Copyright © 1997-1998 Andrew Markwell
  40. You can email me here:  andrew.markwell@unn.ac.uk
  41. or I'm often on The Gathering (telnet: gathering.org.uk 5000)
  42.  
  43.